<%@ page import="com.businessportal.web.dataaccess.entities.*" %>
<%@ page import="javax.servlet.http.*" %>

<script type="application/javascript">

    function doLogout(){
        $.ajax({
            type: "post",
            url: '/securepages/logout.do',
            success: function (result) {
                window.location = "/";
            },
            error: function (result) {
                alert("error happen");
            }
        });
    }

</script>

<div style="text-align: left;display:table-cell;">
    <div style="display: table-cell;">
        <img src="/content/img/logo.png" height="82" width="98">
    </div>
    <div style="display: table-cell; padding-left: 40px;">
        <img src="/content/img/Logo1.png" height="82" width="98">
    </div>
</div>
<div style="display: table-cell; width: 100%; text-align: right; vertical-align: middle; padding-right: 100px;">
    <div style="display: inline; margin-left: 10px;">
        <a href="/" style="color:white;">Main</a>
    </div>

    <div style="display: inline; margin-left: 10px;">
        <a href="/publicpages/calendar_viewer.do" style="color:white;">Calendar</a>
    </div>
    <div style="display: inline; margin-left: 10px;">
        <a href="/publicpages/blog_list.do" style="color:white;">Blogs</a>
    </div>
    <div style="margin-left: 50px;display: inline;">
        <% if(null == (com.businessportal.web.dataaccess.entities.Login)session.getAttribute("user")) {%>
            <div style="display: inline; margin-left: 10px;">
                <a href="/securepages/loginform.do" style="color:white;" >Login</a>
            </div>
            <div style="display: inline; margin-left: 10px;">
                <a href="/securepages/register_user.do" style="color:white;" >Register</a>
            </div>
        <%} else {%>
            <div style="display: inline; margin-left: 10px;">
                <a href="/securepages/blog_creator.do" style="color:white;">Blog Editor</a>
            </div>
            <div style="display: inline; margin-left: 10px;">
                <a href="/securepages/calendar_creator.do" style="color:white;">Calendar Editor</a>
            </div>
            <div style="display: inline; margin-left: 10px;">
                <a href="/securepages/uploads_edit.do" style="color:white;">Uploads Editor</a>
            </div>
            <div style="display: inline; margin-left: 10px;">
                <a href="javascript:void(0);" onclick="javascript:doLogout();" style="color:white;">Logout</a>
            </div>
        <%}%>
    </div>
</div>
